/**
 * @Author       : oak-c
 * @Date         : 2021-01-21 15:41:18
 * @Description  :
 * @LastEditors  : oak-c
 * @LastEditTime : 2021-01-21 15:54:49
 * @FilePath     : /src/controller/sms/sms.controller.ts
 */

import { SmsService } from '@/service'
import { Body, Controller, Post } from '@nestjs/common'
import { CheckCodeDto, SendCodeDto } from './sms.dto'

@Controller('sms')
export class SmsControllers {
    constructor(private readonly smsService: SmsService) {}

    @Post('sendCode')
    public async sendCode(@Body() body: SendCodeDto) {
        return await this.smsService.sendCode(body)
    }

    @Post('checkCode')
    public async checkCode(@Body() body: CheckCodeDto) {
        return await this.smsService.checkCode(body)
    }
}
